package com.lcq.springbootcreate.qureyStudent;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class stucontroller {
    @Autowired
    Service stuService;

    @GetMapping({"student"})
    public String getstuByid(@RequestParam Integer num){
        Student s=stuService.findstudent(num);
        return s.toString();
    }

}
